<template>
  <div class="config-place c-f">
    <template v-if="permission">
      <h3 class="fr ac f-16 mb-20">{{classInfo.provincename}}<i class="el-icon-arrow-right b"></i>{{classInfo.cityname}}<i class="el-icon-arrow-right b"></i>{{classInfo.schoolname}}</h3>
      <transition name="router" mode="out-in">
        <router-view/>
      </transition>
    </template>
    <div v-else class="card fajc">
      <no-right/>
    </div>
  </div>
</template>

<script>
  export default {
    name: 'config-place',
    computed: {
      permission () {
        const { roleid } = this.$store.state
        return [1005].includes(roleid)
      },
      classInfo () {
        return this.$store.state.classinfo
      }
    }
  }
</script>

<style lang="less">
.config-place {
  .search-bar {white-space: nowrap;
    .item {margin-right: 25px;}
    .label {margin-right: 25px;color: rgba(255, 255, 255, .8);}
  }
  .list {padding: 0 20px;background-color: #000418;
    table {table-layout: fixed;width: 100%;}
    th, td {padding: 20px 8px;font-size: 14px;border: 2px solid rgba(243, 246, 250, .2);
      &:first-child {border-left: 0;}
      &:last-child {border-right: 0;
        span {cursor: pointer;color: #2a36e0;}
        span + span {margin-left: 30px;}
      }
    }
    tr:last-child td {border-bottom: 0;}
    th {border-top: 0;
      color: rgba(255, 255, 255, .8);}
    td {text-align: center;}
  }

  .detail {
    .label {width: 150px;min-width: 150px;}
    .item {padding: 12px 0;color: rgba(255, 255, 255, .8);}
    .checkbtn {transition: color .2s;
      &.on {color: #00c8f1;}
    }
    .fr.ac .checkbtn {width: 120px;}
    .el-input {width: 220px;}
    .el-textarea {width: 600px;}
    .el-button--primary {width: 120px;}
  }
}
</style>
